package entity

import (
	"shqsoft.cn/pasnj/base"
)

type RolePermission struct {
	RoleId           int    `gorm:"primary_key;column:RoleId"`
	PermissionId     int    `gorm:"primary_key;column:PermissionId"`
	IsAllowCommision bool   `gorm:"column:IsAllowCommision"`
	IsAllowProxy     bool   `gorm:"column:IsAllowProxy"`
	PermissionType   string `gorm:"column:PermissionType"`
}

//TableName Role 角色表名
func (RolePermission) TableName() string {
	return "t_RolePermission"
}

func RolePermissionEF() base.EntityFunc {
	return func() interface{} {
		entity := RolePermission{}
		return &entity
	}
}
func RolePermissionESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []RolePermission
		return &entities
	}
}

func init() {
	base.DaoPoolObj.Put("RolePermission", base.NewDefaultDao(RolePermissionEF(), RolePermissionESF(), nil))
}
